﻿using System.Diagnostics;
using System.IO;

namespace FreshTexture.Model
{
    internal class MemoryIO
    {
        public static int CheckMemory()
        {
            using (var ramCounter = new PerformanceCounter("Memory", "Available MBytes", true))
            {
                return (int)ramCounter.NextValue();
            }
        }

        public static Stream SelectStream(Stream memory, Stream file)
        {
            //TODO metoda ma wybrać ktory strumien obslugiwac ma FileIO na podstawie ilosci dostepnej pamieci
            Stream selection = memory;

            return selection;
        }
    }
}